package com.service.wmt.impl;

import com.dao.*;
import com.entity.*;
import com.service.wmt.TotalService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
@Service
@Transactional
public class TotalServiceImpl implements TotalService {
    @Resource
    private CompanyDao companyDao;
    @Resource
    private RoomtypeDao roomtypeDao;
    @Resource
    private BuildingstructureDao buildingstructureDao;
    @Resource
    private LanduseDao landuseDao;
    @Resource
    private LandownershipDao landownershipDao;
    @Resource
    private DesignpurposesDao designpurposesDao;
    @Resource
    private GainingmethodDao gainingmethodDao;
    @Resource
    private BuildingareaDao buildingareaDao;
    @Resource
    private LandnumberDao landnumberDao;
    @Resource
    private AreasDao areasDao;


    @Override
    public List<Company> findAllCompany() {
        return companyDao.selectByExample(null);
    }

    @Override
    public List<Roomtype> findAllRoomtype() {
        return roomtypeDao.selectByExample(null);
    }

    @Override
    public List<Buildingstructure> findAllBuildingstructure() {
        return buildingstructureDao.selectByExample(null);
    }

    @Override
    public List<Landuse> findAllLanduse() {
        return landuseDao.selectByExample(null);
    }

    @Override
    public List<Landownership> findAllLandownership() {
        return landownershipDao.selectByExample(null);
    }

    @Override
    public List<Designpurposes> findAllDesignpurposes() {
        return designpurposesDao.selectByExample(null);
    }

    @Override
    public List<Gainingmethod> findAllGainingmethod() {
        return gainingmethodDao.selectByExample(null);
    }

    @Override
    public List<Buildingarea> findAllBuildingarea() {
        return buildingareaDao.selectByExample(null);
    }

    @Override
    public List<Landnumber> findAllLandnumber() {
        return landnumberDao.selectByExample(null);
    }

    @Override
    public List<Areas> findAllAreas() {
        AreasExample areasExample = new AreasExample();
        AreasExample.Criteria criteria = areasExample.createCriteria();
        criteria.andCityidEqualTo("610400");

        return areasDao.selectByExample(areasExample);
    }

    @Override
    public List<Provinces> findAllProvinces() {
        return null;
    }

    @Override
    public List<Cities> findAllCities(Integer provinceid) {
        return null;
    }

    @Override
    public List<Areas> findAllArea(Integer cityid) {
        return null;
    }
}
